<%@ page language="java" import="java.util.*,cat.dao.*,cat.beans.*,cat.utils.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE>
<html>
  <head>    
    <title>会员信息</title>   
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/edittable.css"  ></link>  

  	<style>
  		label{
  			display:block;
  			margin-top:4px;
  			color:red;
  		}
  		
  		.td_input{
  			width:230px;
  		}
  		
  	</style>
  	
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.0.js"></script> 

  </head>
  
  <body>
      <%      	
   			int memberId=Integer.parseInt(request.getParameter("id"));
   			MemberInfo member=new MemberDao().getMemeberById(memberId);
   			request.setAttribute("member", member); 
       %>
     <div class ="div_title">
		 <div class="div_titlename"> <img src="${pageContext.request.contextPath }/images/san_jiao.gif" ><span>会员管理  会员信息</span></div>
	 </div>
				 
	
	     <input type="hidden" name="goodsId" value="${member.id}">
		 <table class="edit_table" >
		 		<tr>
		 			 	<td class="td_info">会员账号</td>	
		 			 	<td class="td_input"> 
		 			 		<label class="txtbox" >${member.memberNo} </label> 
		 			 	</td>   
		 			 	<td class="td_info">会员姓名</td>	
		 				<td>
		 					<label class="txtbox" >${member.memberName} </label> 
		 				</td> 
		 				
		 		</tr>

		 		<tr>
		 				<td class="td_info">联系电话</td>	
		 				<td>
		 					<label class="txtbox" >${member.phone} </label> 
		 				</td>
		 				<td class="td_info">电子邮箱</td>	
		 				<td><label class="txtbox" >${member.email} </label>
		 			
		 		</tr>	
		 		
		 		<tr >
		 				<td class="td_info">注册日期</td>	
						<td><label class="txtbox" >${member.registerDate} </label> </td>
		 			    <td class="td_info">身份证号</td>	
						<td>
							<label class="txtbox" >${member.phone} </label>
						</td>
		 		</tr>

		 		
		 		<tr >
		 				<td class="td_info">登录次数</td>	
						<td><label class="txtbox" >${member.loginCounts} </label></td>
		 			    <td class="td_info">最后登录时间</td>	
							<td><label class="txtbox" >${member.lastLoginDate} </label> </td>
		 			    <td></td>
		 		</tr>
		 		
		 		<tr >
		 				<td class="td_info">会员常用ip</td>	
		 				<td id="td_ip"> </td>
					
		 			    <td class="td_info">会员等级</td>
		 				<td><label class="txtbox" >${member.memberLevel} </label> </td>
		 		</tr>
		 		

		 		<tr>
		 			<td class="td_info"> </td>	
		 			<td> 
		 				<button class="form_btn" onclick="window.history.back()" >返回 </button>
		 			</td>	
		 			<td></td>
		 			<td></td>
		 		</tr>
		</table>
		
		 <script>	
			//处理会员常用ip 的显示
			$(function(){	
				var ipStr="${member.ip}";  // 是这样的格式 ===> 192.168.1.100,202.92.223.33,168.23.45.111 
				if(ipStr!=""){
					var ipList=ipStr.split(",");
					$.each(ipList,function(){
						var labelStr="<label class='txtbox'>"+this+"</label>";
						$("#td_ip").append(labelStr);
					});
				}
			});
	   </script>
  </body>
</html>
